A. Factory Method
B. Singleton
C. Observer
D. None of the mentioned
Explanation: In singleton pattern, the class itself is made responsible for keeping track of its instance.Thus it ensures that no more than one instance is created.
Advertisement
Related Mcqs:
- Which mechanism is applied to use a design pattern in an OO system ?
- A. Inheritance B. Composition C. All of the mentioned D. None of the mentioned...
- You want to minimize development cost by reusing methods? Which design pattern would you choose ?
- A. Adapter Pattern B. Singleton Pattern C. Delegation pattern D. Immutable Pattern...
- Which of the following is a design pattern?
- A. Behavioral B. Structural C. Abstract Factory D. All of the mentioned...
- Which design pattern defines one-to-many dependency among objects ?
- A. Singleton pattern B. Facade Pattern C. Observer pattern D. Factory method pattern...
- In factory method pattern, the framework must instantiate classes but it only knows about the abstract classes, which it cannot initiate. How would one solve this problem ?
- A. encapsulating the knowledge of which document subclass to is to be created and B. moving this knowledge out of the framework C. instantiating the application specific documents without knowing their class D. all of the mentioned...
- You want to avoid multiple inheritance. Which design pattern would you choose ?
- A. Abstraction-Occurrence Pattern B. Player-Role Pattern C. General Hierarchy Pattern D. Singleton Pattern...
- What is a collection of operations that specify a service of a class or component ?
- A. Use Case B. Actor C. Interface D. Relationship...
- Which of the following is not a user interface design process ?
- A. User, task, and environment analysis and modeling B. Interface design C. Knowledgeable, frequent users D. Interface validation...
- The ___________________ enables the software engineer to develop models of the information domain and functional domain at the same time___________________?
- A. data flow diagram B. state transition diagram C. control specification D. activity diagram...
- Which model shows the flow of object interactions?
- A. Sequence model B. Subsystem model C. Dynamic model D. Both Sequence and Dynamic model View Answer Answer: a Explanation: Sequence model are represented using a UML sequence or a collaboration diagram and are dynamic models....
Advertisement